package com.lin.cloud.disk.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 公司状态枚举类
 * @author ljc
 * @date 2021/1/22 11:46
 */
@Getter
@AllArgsConstructor
public enum  ECompanyStatus {
    WAIT_REVIEW(0,"待审核"),
    PASS_REVIEW(1,"审核通过"),
    UN_PASS_REVIEW(2,"审核未通过"),
    EXPIRED(3,"已过期"),
    DELETE(4,"已注销");

    private Integer status;
    private String message;


    /**
     * 获取状态信息
     * @param status
     * @return
     */
    public static String getStatusMessage(Integer status){
        if (null == status) {
            return "";
        }else {
            ECompanyStatus[] values = ECompanyStatus.values();
            for (ECompanyStatus value : values) {
                if (status.equals(value.getStatus())) {
                    return value.getMessage();
                }
            }
            return "";
        }
    }

}
